<div class="al-modal-view">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
      <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
      <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title ok-color">{{modalTitle}}</h4>
  </div>
  <div class="modal-body">
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group">
          <label class="col-sm-3 control-label">名称<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.name" type="text"
                   ng-required="true" name="name"
                   placeholder="公寓名称" maxlength="32"/>
            <div class="help-block with-errors"
                 ng-if="modalForm.name.$invalid && !modalForm.name.$pristine">
              名称不可为空
            </div>
          </div>
        </div>
        <div class="form-group" ng-if="type!='new'">
          <label class="col-sm-3 control-label">编号</label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.uuid" type="text" readonly
                   placeholder="公寓编号"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">简介</label>
          <div class="col-sm-8">
            <textarea class="form-control" ng-model="data.brief" cols="3" maxlength="1024"
                   placeholder="公寓简介"></textarea>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">起订价格<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="minPrice" required ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.minPrice">
            </div>
            <div class="help-block with-errors"
                 ng-if="modalForm.minPrice.$invalid && !modalForm.minPrice.$pristine">
              请输入正确的起订价格
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">地址<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.address" required
                   type="text" name="address"
                   placeholder="" maxlength="50"/>
            <div class="help-block with-errors"
                 ng-if="modalForm.address.$invalid && !modalForm.address.$pristine">
              名称不可为空
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">联系电话</label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.tel"
                   type="text" name="tel" ng-pattern="$root.phonePlusVd"
                   placeholder="联系电话" maxlength="20"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">收费提前天数<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.beforeFee"
                   type="number" name="beforeFee" required ng-pattern="/^[1-9][0-9]{0,1}$/"
                   placeholder="收费提前天数" maxlength="20"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">家电保修天数<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.deliverDay"
                   type="number" name="deliverDay" required ng-pattern="/^[1-9][0-9]{0,1}$/"
                   placeholder="家电保修天数" maxlength="20"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">法人<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.corporation"
                   type="text" name="corporation" required
                   placeholder="法人" maxlength="100"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">物业费<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="manageFee" required ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.manageFee">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">电费单价<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="powerPrice" required ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.powerPrice">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">水费单价<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="waterPrice" required ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.waterPrice">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">保洁费</label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="cleanPrice" ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.cleanPrice">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">月停车费</label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="carRental"  ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.carRental">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">临时停车费</label>
          <div class="col-sm-8">
            <div class="input-group">
              <span class="input-group-addon">￥</span>
              <input type="number"  name="carFee" ng-pattern="$root.priceVd"
                     class="form-control" ng-model="data.carFee">
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">停车收费标准</label>
          <div class="col-sm-8">
            <textarea class="form-control" ng-model="data.carStandard" cols="3" maxlength="1024"
                      placeholder="停车收费标准"></textarea>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">合同模板</label>
          <div class="col-sm-8">
            <input type="file" id="contractDemoInput" style="display: none;">
            <div class="input-group">
              <input type="text"  name="thumb" class="form-control" ng-model="data.street">
              <span class="input-group-addon" ng-click="uploadContractDemo()">
                    <i class="glyphicon glyphicon-upload"></i>
                  </span>
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">退租审核人<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <div class="input-group">
              <input type="text"  name="priceDesc" required placeholder="请输入退租审核人的钉钉ID,如08622922041215703"
                     class="form-control" ng-model="data.priceDesc">
            </div>
            <div class="help-block with-errors"
                 ng-if="modalForm.prieDesc.$invalid && !modalForm.prieDesc.$pristine">
              请输入正确的退租审核人用户ID
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">封面图<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <div class="input-group">
              <input type="text"  name="thumb" class="form-control" ng-model="data.thumb" required>
              <span class="input-group-addon" ng-click="showPhotoUpload=!showPhotoUpload">
                    <i class="glyphicon glyphicon-upload"></i>
                  </span>
            </div>
          </div>
        </div>
        <div class="form-group" ng-if="data.thumb">
          <div class="col-sm-8 col-sm-offset-3">
            <div class="wf-thumbnail-container">
              <img ng-src="{{data.thumb}}" class="wf-thumbnail" alt="找不到该图片">
            </div>
          </div>
        </div>
        <div class="form-group" ng-show="showPhotoUpload">
          <div class="col-sm-8 col-sm-offset-3">
            <input id="photo-upload-input" class="file" name="file" type="file" data-min-file-count="1">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">状态</label>
          <div class="col-sm-8">
            <nobr>
              <label class="ui-radio" ng-repeat="option in modalEnableList">
                <input name="status" ng-value="option.value" type="radio" ng-model="data.enabled">
                <span>{{option.name}}</span>
              </label>
            </nobr>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">描述</label>
          <div class="col-sm-8">
            <div class="panel panel-default" style="min-height: 250px">
              <div class="panel-body">
                <div text-angular ng-model="data.description" class="ui-editor">
                </div>
              </div>
            </div>
          </div>
        </div>

      </ng-form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
    <button class="btn btn-primary no-border" type="button" ng-click="confirm()" ng-disabled="modalForm.$invalid">确定</button>
  </div>
</div>